<script>
	export default {
		onLaunch: function() {
			console.log('App Launch')
			
		   
		},
		onShow: function() {
			console.log('App Show')
			// let ua = navigator.userAgent.toLowerCase();
			// if(ua.indexOf('micromessenger') != -1){
			// 	console.log("微信")
			// }else{
			// 	console.log("44")
			// }
			if(uni.getStorageSync('storage_time') != '') {
				let storage_time = uni.getStorageSync('storage_time');
				let now_date = new Date().getTime();
				let _diff = now_date - storage_time;
				// 七天自动清除缓存
				if(_diff > 604800000) {
					uni.clearStorageSync();
				}
			}
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style lang="scss">
	@import 'styles/base.scss';
	
	@import "uview-ui/index.scss";

</style>
